﻿
Imports System.Runtime.CompilerServices
Imports osi.interface.storage

Public Module settings_reader
    <Extension()> Public Function debug(ByVal i As base_accessor_t) As Boolean
        Return Not i Is Nothing AndAlso Not i.settings() Is Nothing AndAlso i.settings().debug
    End Function

    <Extension()> Public Function max_key_count(ByVal i As map_sync_accessor) As Int64
        If i Is Nothing OrElse i.settings() Is Nothing Then
            Return maxInt64
        Else
            Return i.typed_settings().max_key_count
        End If
    End Function
End Module
